#ifndef FILEMD5_H
#define FILEMD5_H

#include <QObject>
#include <QHash>
#include <QStringList>
#include <QFile>
#include <QDebug>
#include <QCryptographicHash>
#include <QDir>
#include <QFileInfo>

class FileMd5 : public QObject
{
    Q_OBJECT
public:
    explicit FileMd5(QObject *parent = 0);

signals:
    void gotDuplicate(const QHash<QByteArray,QStringList> &duplicate);
    void progress(int ccurrent,int total);

public slots:
    void checkDuplicate(const QString &path);

private:
    QStringList getFiles(const QString &path);
    QByteArray getFileMd5(const QString &filename);
};

#endif // FILEMD5_H
